This file contains information on replicating the paper, "Presidential Selection of Supreme Court Nominees: The Characteristics Approach," by Charles Cameron, Jonathan Kastellec and Lauren Mattioli.  

***Table of Contents***

The following files are "base" data files used in the replication (listed in alphabetical order)

-- "COA_characteristics_workspace.Rdata" A R workspace with several objects that summarize the characteristics of judges on the Courts of Appeals.
-- "combined_central_tendency_stats_1930_2018.dta": Dataset of central tendency statistics about Supreme Court Justices
-- "combined_platform_data.dta": Data from the Democratic and Republican Party Platforms, 1928-2016
-- "full_short_list_data_for_characteristics.dta": Data on the characteristics of nominees and short-list candidates
-- "master_nominee_data_post_1930.dta" Data about attributes of Supreme Court nominees, 1930-2018
-- "party_control_updated_1861_2018.dta" Data about party control of Congress
-- "pca_pres_interest_score.dta" Data of factor score summarizing presidential/party interest in Supreme Court
-- "pres_senate_NOMINATE_data.dta": Dataset of ideal points of Senate and President
-- "presidential_start_stop_dates.xlsx": Start and stop dates for presidential administrations (this is used solely for graphical purposes)
-- "SC_means_medians_at_time_of_vacancy_Over_Time.dta": Date about ideal point of mean/median justice, at time of each vacancy, 1930-2018

-- "updated_presidential_mentions_for_time_series_graph.dta" A dataset decribring presidential mentions about Supreme Court, 1930-2018

In addition, the following datasets are created by the do file "regression_analyses_do_file.do" (described below), which contain post-estimation results from the regression models.

-- "tobit_postestimates_for_R.dta": Short-list data updated with model results
-- "ideology_sims.dta" Simulations from Ideology Models
-- "diversity_sims_from_logit.dta" Simulations from Diversity Models




The following scripts and do file perform all the calculations used in the paper

-- "regression_analyses_do_file.do" runs all the regression models used in the paper. It also creates "tobit_postestimates_for_R.dta"
---Note: Stata 14.2 was used to estimate all models in this paper. The syntax for the tobit command has been updated for Stata 15. Clustered standard errors are now specified using vce(cluster [insert variable name]) instead of cluster([insert variable name]). See the tobit help file for more information.

-- "R_script_make_all_graphs.R" makes all the graphs that appear in the paper. It also contains any calculations mentioned in the text

***Seed locations***
-- "regression_analyses_do_file.do" sets seeds in the postsim command for the ideology and diversity simulations in the paper.

***Additional Dependencies*** 
*Stata
The Stata add-ons estout and more_clarify are needed to run the included .do file. Source files are included in the packages folder.

*R
Here is the session info that describes which packages (and versions) in R we used. Source files are included in the packages folder.

> sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.6

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] tidyr_0.8.2       dplyr_0.7.8       gridExtra_2.3     ggrepel_0.8.0     ggplot2_3.1.0     readxl_1.1.0      readstata13_0.9.2

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.0       cellranger_1.1.0 pillar_1.3.0     compiler_3.5.1   nloptr_1.2.1     plyr_1.8.4       bindr_0.1.1      tools_3.5.1      lme4_1.1-19     
[10] tibble_1.4.2     gtable_0.2.0     nlme_3.1-137     lattice_0.20-35  pkgconfig_2.0.2  rlang_0.3.0.1    Matrix_1.2-14    rstudioapi_0.8   yaml_2.2.0      
[19] bindrcpp_0.2.2   coda_0.19-2      withr_2.1.2      grid_3.5.1       tidyselect_0.2.5 glue_1.3.0       R6_2.3.0         arm_1.10-1       minqa_1.2.4     
[28] purrr_0.2.5      magrittr_1.5     scales_1.0.0     MASS_7.3-51.1    splines_3.5.1    abind_1.4-5      assertthat_0.2.0 colorspace_1.3-2 lazyeval_0.2.1  
[37] munsell_0.5.0    crayon_1.3.4    